﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WLMes.Models
{
    /// <summary>
    /// 输入参数
    /// </summary>
    public class ISSUE_TASK_request
    {
        /// <summary>
        /// 请求编号
        /// </summary>
        public string RequestCode { get; set; }
        /// <summary>
        /// 产线编号
        /// </summary>
        public string LineCode { get; set; }
        /// <summary>
        /// 工序编号
        /// </summary>
        public string OperationCode { get; set; }
        /// <summary>
        /// 工序短名称
        /// </summary>
        public string OperationShortName { get; set; }

        /// <summary>
        /// 事件码
        /// </summary>
        public short EventCode { get; set; }
        /// <summary>
        /// 请求时间
        /// </summary>
        public string RequestTime { get; set; }
        /// <summary>
        /// 工艺信息
        /// </summary>
        public List<ProcessInfox> ProcessInfo { get; set; }

    }

    /// <summary>
    /// 任务单部件集合（2021.03.03新增）
    /// </summary>
    // class PartSets
    //{
    //    /// <summary>
    //    /// 部件顺序号
    //    /// </summary>
    //    public int SequenceNumber { get; set; }
    //    /// <summary>
    //    /// 部件唯一码(序列号SNR)
    //    /// </summary>
    //    public string PartSerialNumber { get; set; }

    //}
    public class SourcePartSizeSets
    {
        /// <summary>
        /// 尺寸1默认外尺寸
        /// </summary>
        public string Size1 { get; set; }
        /// <summary>
        /// 尺寸2
        /// </summary>
        public string Size2 { get; set; }
    }
    /// <summary>
    /// 输出物料尺寸
    /// </summary>
    public class TargetPartSizeSets
    {
        /// <summary>
        /// 尺寸1默认外尺寸
        /// </summary>
        public string Size1 { get; set; }
        /// <summary>
        /// 尺寸2
        /// </summary>
        public string Size2 { get; set; }
    }
    /// <summary>
    /// 加工程序集合
    /// </summary>
    public class ProductionProgramSets
    {
        /// <summary>
        /// 程序序号
        /// </summary>
        public int ProgramSequenceNumber { get; set; }
        /// <summary>
        /// 程序编号
        /// </summary>
        public string ProgramNumber { get; set; }
        /// <summary>
        /// 加工程序类型G代码(预设值为2)文件或配方程序（预设值为1）
        /// </summary>
        public int ProgramType { get; set; }
        /// <summary>
        /// 加工程序说明
        /// </summary>
        public string ProgramDescription { get; set; }
        /// <summary>
        /// 加工程序文件路径（URL）或配方程序号
        /// </summary>
        public string ProgramURL { get; set; }

    }
    /// <summary>
    /// 文件附件集合
    /// </summary>
    public class AttachmentSets
    {
        /// <summary>
        /// 文件序号
        /// </summary>
        public int FileSequenceNumber { get; set; }
        /// <summary>
        /// 文件名称或描述
        /// </summary>
        public string FileName { get; set; }
        /// <summary>
        /// 文件编号
        /// </summary>
        public string FileNumber { get; set; }
        /// <summary>
        /// 文件类型
        /// </summary>
        public string FileType { get; set; }
        /// <summary>
        /// 作业指导书及文件路径（URL）
        /// </summary>
        public string FileURL { get; set; }

    }

    /// <summary>
    /// 物料集合
    /// </summary>

    public class MaterialSets
    {
        /// <summary>
        ///物料序号
        /// </summary>
        public int MaterialSequenceNumber { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }
        /// <summary>
        /// 物料描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 物料类型
        /// </summary>
        public int MaterialType { get; set; }
        /// <summary>
        /// 物料数量
        /// </summary>
        public double Quantity { get; set; }
        /// <summary>
        /// 计量单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 尺寸
        /// </summary>
        public string SIZE { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public string COLOR { get; set; }

    }
    [SugarTable(TableName = "MaterialSets")]
    public class MaterialSetsDTO
    {
        /// <summary>
        ///物料序号
        /// </summary>
        public int MaterialSequenceNumber { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }
        public string MaterialSets_ID{ get; set; }
    /// <summary>
    /// 物料描述
    /// </summary>
    public string Description { get; set; }
        /// <summary>
        /// 物料类型
        /// </summary>
        public int MaterialType { get; set; }
        /// <summary>
        /// 物料数量
        /// </summary>
        public double Quantity { get; set; }
        /// <summary>
        /// 计量单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 尺寸
        /// </summary>
        public string SIZE { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public string COLOR { get; set; }

    }
    public class PartSets_Lists
    {
        /// <summary>
        /// 部件顺序号
        /// </summary>
        public int SequenceNumber { get; set; }
        /// <summary>
        /// 部件唯一码（序列号SNR）
        /// </summary>
        public string PartSerialNumber { get; set; }

    }
    [SugarTable(TableName = "PartSets_Lists")]
    public class PartSets_ListsDTO
    {
        /// <summary>
        /// 部件顺序号
        /// </summary>
        public int SequenceNumber { get; set; }
        /// <summary>
        /// 部件唯一码（序列号SNR）
        /// </summary>
        public string PartSerialNumber { get; set; }

        public string PartSets_Lists_ID { get; set; }
        public string partsets_listsUserTime { get; set; }
        public string CompleteTime { get; set; }
        public string BindPallet { get; set; }
        public string OnlineTime { get; set; }

    }

    /// <summary>
    /// 加工参数集合
    /// </summary>
    public class ParameterSets
    {
        /// <summary>
        /// 参数序号
        /// </summary>
        public int ParameterSequenceNumber { get; set; }
        /// <summary>
        /// 参数编码
        /// </summary>
        public string ParameterCode { get; set; }
        /// <summary>
        /// 参数类型
        /// </summary>
        public int ParameterType { get; set; }
        /// <summary>
        /// 参数名称
        /// </summary>
        public string ParameterName { get; set; }
        /// <summary>
        /// 参数值
        /// </summary>
        public string ParameterValue { get; set; }

    }
    [SugarTable(TableName = "ParameterSets")]
    public class ParameterSetsDTO
    {
        /// <summary>
        /// 参数序号
        /// </summary>
        public int ParameterSequenceNumber { get; set; }
        /// <summary>
        /// 参数编码
        /// </summary>
        public string ParameterCode { get; set; }
        /// <summary>
        /// 参数类型
        /// </summary>
        public int ParameterType { get; set; }
        /// <summary>
        /// 参数名称
        /// </summary>
        public string ParameterName { get; set; }
        /// <summary>
        /// 参数值
        /// </summary>
        public string ParameterValue { get; set; }

        public string ParameterSets_ID { get; set; }

    }

    /// <summary>
    /// 返回信息
    /// </summary>
    public class ISSUE_TASK_response
    {
        /// <summary>
        /// 事件码
        /// </summary>
        public ushort EventCode { get; set; }
        /// <summary>
        /// 描述信息
        /// </summary>
        public string EventDescription { get; set; }

    }

    public class ProcessInfox
    {
        public int BatchSequence { get; set; }
        public string CategoryType { get; set; }
        public int PartsQuantity { get; set; }
        public string ProductionBatchCode { get; set; }
        public List<BoardMaterialSet> BoardMaterialSets { get; set; }
        public List<TaskSetx> TaskSets { get; set; }
    }
    public class BoardMaterialSet
    {
        public int MatSequenceNumber { get; set; }
        public string MaterialCode { get; set; }
        public string MaterialDescription { get; set; }
        public string MaterialQuality { get; set; }
        public string Color { get; set; }
        public string Specification { get; set; }
        public string EntranceCode { get; set; }
        public int MaterialQuantity { get; set; }

    }
    public class TaskSetx
    {
        public int TaskSequenceNumber { get; set; }
        public string PartMatCode { get; set; }
        public string PartMatDescription { get; set; }
        public string TaskNumber { get; set; }
        public string SAPBatchNumber { get; set; }
        public string SAPOrderDescription { get; set; }
        public int Quantity { get; set; }
        public string Series { get; set; }
        public string ProductionProcess { get; set; }
        public bool IsPaint { get; set; }
        public int Outside_Height { get; set; }
        public int Outside_Width { get; set; }
        public int Outside_Thickness { get; set; }
        public string DoorPocket_Style { get; set; }
        public int DoorLeaf_Height { get; set; }
        public int DoorLeaf_Width { get; set; }
        public int DoorLeaf_Thickness { get; set; }
        public string DoorLeaf_Style { get; set; }
        public string Color { get; set; }
        public int StripSides { get; set; }
        public int DoorCasing_PushSide { get; set; }
        public int DoorCasing_PullSide { get; set; }
        public int DoorCasing_Width { get; set; }
        public string DoorHead_PushSide { get; set; }
        public string DoorHead_PullSide { get; set; }
        public int PartLength { get; set; }
        public int PartWidth { get; set; }
        public int PartThickness { get; set; }
        public string PartCategories { get; set; }
        public string Comment { get; set; }
        public List<PartSetxx> PartSets { get; set; }
        public List<SourcePartSizeSetD> SourcePartSizeSets { get; set; }
        public List<TargetPartSizeSetd> TargetPartSizeSets { get; set; }
        public List<ProductionProgramSetd> ProductionProgramSets { get; set; }
        public List<AttachmentSetsd> AttachmentSets { get; set; }
        public List<MaterialSetsd> MaterialSets { get; set; }
        public List<ParameterSetsd> ParameterSets { get; set; }
    }
    public class PartSetxx
    {
        public int SequenceNumber { get; set; }
        public string PartSerialNumber { get; set; }

    }
    public class SourcePartSizeSetD
    {
        public string Size1 { get; set; }
        public string Size2 { get; set; }

    }
    public class TargetPartSizeSetd
    {
        public string Size1 { get; set; }
        public string Size2 { get; set; }
    }
    public class ProductionProgramSetd
    {
        public int ProgramSequenceNumber { get; set; }
        public string ProgramNumber { get; set; }
        public int ProgramType { get; set; }
        public string ProgramDescription { get; set; }
        public string ProgramURL { get; set; }

    }
    public class AttachmentSetsd
    {
        public int FileSequenceNumber { get; set; }
        public string FileName { get; set; }
        public string FileNumber { get; set; }
        public string FileType { get; set; }
        public string FileURL { get; set; }

    }
    public class MaterialSetsd
    {
        public int MaterialSequenceNumber { get; set; }
        public string MaterialCode { get; set; }
        public string Description { get; set; }
        public int MaterialType { get; set; }
        public double Quantity { get; set; }
        public string SIZE { get; set; }
        public string COLOR { get; set; }
        public string Unit { get; set; }

    }
    public class ParameterSetsd
    {
        public int ParameterSequenceNumber { get; set; }
        public string ParameterCode { get; set; }
        public int ParameterType { get; set; }
        public string ParameterName { get; set; }
        public string ParameterValue { get; set; }

    }
}
